<html>
    <#include "../common/header.ftl">
<body>
<div id="wrapper" class="toggled">
<#--边栏-->
            <#include "../common/nav.ftl">
<#--主要内容区域-->
    <div id="page-content-wrapper" >
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form role="form" action="/sell/seller/product/save"  method="post" >
                        <input type="hidden" name="id" value="${(product.id)!''}"/>
                        <div class="form-group">
                            <label for="exampleInputEmail1">名称</label>
                            <input type="text" name="productName" class="form-control" value="${(product.productName)!''}" />
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">价格</label>
                            <input type="text" name="productPrice" class="form-control" value="${(product.productPrice)!''}" />
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">库存</label>
                            <input type="number" name="productStock" class="form-control" value="${(product.productStock)!''}" />
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">描述</label>
                            <input type="text" name="productDescription" class="form-control" value="${(product.productDescription)!''}" />
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">图片</label>
                            <img src="${(product.productIcon)!''}" alt="" width="200px" height="180px" />
                            <input type="text" name="productIcon" class="form-control" value="${(product.productIcon)!''}" />
                        </div>
                        <div class="form-group">
                            <label for="exampleInputEmail1">类目</label>
                            <select class="form-control" name="categoryType">
                                <#list categoryList as category>
                                    <option value="${category.categoryType}"
                                            <#if (product.categoryType)?? && (category.categoryType == product.categoryType)>
                                                selected
                                            </#if>>
                                        ${category.categoryName}
                                    </option>
                                </#list>
                            </select>
                        </div>
                        <button type="submit" class="btn btn-default">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>